package com.michaelwolf.mytool.wcfcompmanger.wcfanalyzer;

import java.util.Set;

import org.w3c.dom.Node;

import com.michaelwolf.mytool.wcfcompmanger.wcfanalyzer.WCFLoader.TraverseCacheData;

public class SearchKeyWordHandler implements AttributesHandler {
	
	private String keyword;

	public SearchKeyWordHandler(String keyword) {
		this.keyword = keyword;
	}

	@Override
	public void process(Node attrnode, TraverseCacheData traverseCacheData, String moduleName) {
		
		
		Set<Node> foundNodes = traverseCacheData.getFoundNode();
		String value = attrnode.getNodeValue();
		if(value.contains(keyword)){
			foundNodes.add(attrnode);
		}
		
		
		
		
	}

}
